package com.hundsun.cprs.yyt.service.trade.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author herong22384
 * @date 2019/7/23 15:21
 */
public enum EnumReturnGoodsFlowStatus {

    WAIT_AUDIT("0", "待审核"),
    FAIL_AUDIT("1", "审核不通过"),
    PASS_AUDIT("2","审核通过");

    EnumReturnGoodsFlowStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private String code;

    private String  desc;

    /**
     * 全局索引池
     */
    private static Map<String, EnumReturnGoodsFlowStatus> pool = new HashMap<String, EnumReturnGoodsFlowStatus>();
    static {
        for (EnumReturnGoodsFlowStatus et : EnumReturnGoodsFlowStatus.values()) {
            pool.put(et.code, et);
        }
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static Map<String, EnumReturnGoodsFlowStatus> toMap() {
        return pool;
    }
}
